package com.lxh.lxhcrm.model.mappers.customer;

import com.lxh.lxhcrm.model.pojos.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface CusMapper {
    /***查询所有客户信息*/
    public List<Customer> allCusInfor(String search,Integer cusTypeName,Integer stageId);
    public List<Customer>  select_cus();
    /***查询所有客户类型*/
    public List<CusStage> allStage();
    /**查询所有客户类型*/
    public List<CustomerType> allCusType();
    /**查询所有客户来源*/
    public List<CustomerSource> allCusSource();
    /**查询所有公海*/
    public List<Sea> allSea();
    /**查询所有联系人 //带分页*/
   public  List<Contact> all_linkman();
    /**查询所有联系人类型*/
    public  List<ContactType> all_contact_type();
    /**查询某客户所有联系人*/
    public  List<Contact> hisLinkman(Integer customerId);
    /**查询某客户所有销售机会*/
    public  List<Opportunity> hisSaleOppo(Integer customerId);
    /**查询某客户所有相关行动记录*/
    public List<ActionRecord> allActionRecor(Integer customerId);
    /** 时间线*/
    public List<Map<String,Object>>  timeLine(Integer customerId);
    /**查询某客户所有相关合同*/
    public List<Contract> allHisContracts(Integer customerId);
    /**查询某客户行为分数*/
    public List<BehaviorRecord> actionScore(Integer customerId);
    /**成交客户统计 按客户类型*/
    public Map<String,Object> cusNum(@Param("activeName") String activeName, @Param("customerTypeId") Integer customerTypeId);
    public Map<String,Object> acReNum(@Param("activeName") String activeName,@Param("customerTypeId")Integer customerTypeId);
    public Map<String,Object> oppoNum(@Param("activeName") String activeName,@Param("customerTypeId")Integer customerTypeId);
    public Map<String,Object> contractNum(@Param("activeName") String activeName,@Param("customerTypeId")Integer customerTypeId);
    public List<Map<String,Object>> saleStatic();

}